import lombok.Data;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

@Data
public class Book {
    private Integer id;
    private String title;
    private String date;
    private String author;
    private Double price;
    private int quantity;
    public Book(Integer id, String title, String date, String author, Double price, int quantity) {
        this.id = id;
        this.title = title;
        this.date = date;
        this.author = author;
        this.price = price;
        this.quantity = quantity;
    }
    public Book() {}

    @Override
    public String toString() {
        return "Books{" +
                "编号=" + id +
                ", 书名《" + title + "》" +'\'' +
                ", 出版日期=" + date +
                ", 作者='" + author + '\'' +
                ", 价格=" + price +
                ", 数量=" + quantity +
                '}';
    }
}
